package com.liao.controller;

import com.liao.common.Result;
import com.liao.entity.BookPublisher;
import com.liao.service.BookPublisherService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/publishers")
public class BookPublisherController {

    @Resource
    private BookPublisherService bookPublisherService;

    @GetMapping("/all")
    public Result<List<String >> getAllPublishers() {
        return Result.success(bookPublisherService.getAllPublishers());
    }
}
